package cn.train.controler;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.train.model.UserTable;
import cn.train.service.UserTableService;
@WebServlet("/GetTableServlet")
public class GetTableServlet extends HttpServlet {
	
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		String realname=req.getParameter("zhenshi");
		System.out.println("名字"+realname);
		UserTableService userService=new UserTableService();
		UserTable userta =userService.getTable(realname);
		req.setAttribute("userta", userta);
		
		req.getRequestDispatcher("/font/pay/vip_userinfor.jsp").forward(req, resp);
		
	}
	
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doGet(req,resp);
	}

}
